﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Yun.IM.Response;
using Yun.Interface;
using Yun.Util;

namespace Yun.IM.Request
{
    /// <summary>
    /// 获取用户聊天列表
    /// yun.im.rongcloud.user.chat.list
    /// </summary>
    public class GetUserChatListRequest : ITopRequest<GetRealTimeMsgListResponse>
    {
        /// <summary>
        /// 页码
        /// </summary>
        public int PageNum { get; set; } = 1;

        /// <summary>
        /// 页容量
        /// </summary>
        public int PageSize { get; set; } = 1;


        public void Validate()
        {
            RequestValidator.ValidateMaxValue("pagesize", PageSize, 1000);
        }


        public string GetApiName()
        {
            return "yun.im.rongcloud.user.chat.list";
        }

        public IDictionary<string, string> GetParameters()
        {
            var parameters = new YunDictionary
            {
                {"pagesize", PageSize},
                {"pagenum", PageNum}
            };

            return parameters;
        }
         
    }
}
